<head>
    <title></title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body class="container">

<form method="post">
  <textarea placeholder="输入产品 ID，每行一条" name="ids" rows="10"></textarea>
  <button type="submit">提交</button>
</form>

<?php 
  var_dump($result);
?>

<?php if (is_array($result) && !empty($result)) { ?>
<table class="table">
  <thead>
    <tr>
      <th>名称<br/>goods_name</th>
      <th>分类编号<br/>cate_id</th>
      <th>销售价<br/>shop_price</th>
      <th>成本价</br>cost_price</th>
      <th>原始图片</br>original_img</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($result as $item) { ?>
    <tr>
      <td><?php if(isset($item['name'])) echo $item['name']?></td>
      <td><?php if(isset($item['cate_id'])) echo $item['cate_id']?></td>
      <td><?php if(isset($item['price'])) echo ((substr($item['price'], 1) + 10) * 7.5)?></td>
      <td><?php if(isset($item['price'])) echo ((substr($item['price'], 1) + 10) * 6.8)?></td>
      <td><?php if(isset($item['id'])) echo '/public/upload/2017/07-16/' . $item['id'] . '-1.jpg'?></td>
    </tr>
    <?php } ?>
  </tbody>
</table>
<?php } ?>
</body>

